! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Selection-box is drawn outside the image.
Status:
RESOLVED: FIXED
Product:
Ristretto
Component:
Application

Comments

Description Stephan Arts editbugs 2011-12-18 01:02:16 CET
When starting a selection outside the image-boundaries, the selection-box is drawn from that location to the image-border. This should not happen, because selecting or zooming into 'nothing' makes no sense.
Comment 1 Stephan Arts editbugs 2011-12-18 01:02:57 CET
This is a bug which is present in all versions of ristretto, but only shows since the migration to cairo (0.3.0)
Comment 2 Eric Koegel editbugs 2011-12-18 19:18:34 CET
Created attachment 4035 
Change paint_selection_box in image_viewer.c to not paint a selection-box when the box_width or height < 0.0

It appears that drawing a selection-box of 0.0 becomes a 1 pixel selection box so I set it to return early rather than draw anything. This fixes the selection box bug with the testing I've done, but please let me know if it breaks anything.
Comment 3 Stephan Arts editbugs 2011-12-18 22:20:21 CET
That indeed is a better solution then setting the width to 0.

I've committed the patch and added some additional comments.

Bug #8254

Reported by:
Stephan Arts
Reported on: 2011-12-18
Last modified on: 2011-12-18

People

Assignee:
Stephan Arts
CC List:
0 users

Version

Attachments

Additional information